<template>
	<view>
		<view style="background: url(https://static-1310167831.cos.ap-nanjing.myqcloud.com/uploads/20230411/e63bcf73858e37c567847ca55821ddfa.png) no-repeat;background-size: 100%;width: 100%;height: 414rpx;">

		</view>
		<view style="width: 92%;position: absolute;top:10rpx;left: 4%;padding-bottom: 30rpx;">
			<!-- <view v-for="(item,index) in list" :key='index' style="box-sizing: border-box;padding: 30rpx;background-color: #FFFFFF;margin-top: 26rpx;border-radius: 12rpx;">
				<view style="overflow: hidden;">
					<view style="width: 18%;float: left;overflow: hidden;">
						<image :src="item.user.avatar" style="width: 92rpx;height: 92rpx;border-radius: 50%;display: block;" mode=""></image>
					</view>
					<view style="width: 82%;float: left;">
						<view style="height: 46rpx;line-height: 46rpx;">
							<text style="color: #000000;font-size: 30rpx;display: inline-block;width: 200rpx;font-weight: 600;" class="yihang">{{item.user.nickname}}</text>
							<text style="color: #999999;font-size: 24rpx;float: right;">发布于 {{item.create_time}}</text>
						</view>
						<view style="overflow: hidden;">
							<view style="height: 46rpx;line-height: 46rpx;color: #999999;font-size: 24rpx;float: left;width: 60%;" class="yihang">
								{{item.user.company || ''}}
							</view>
							<view style="height: 46rpx;line-height:46rpx;float: left;width: 40%;overflow: hidden;">
								<text @click="zhi(item.id)" style="padding: 0rpx 20rpx;font-size: 24rpx;color:#D46B00 ;background-color: #fff1dc;float: right;border-radius: 6rpx;margin-left: 10rpx;">置顶</text>
								<text @click="shua(item.id)" style="padding: 0rpx 20rpx;font-size: 24rpx;color:#FFFFFF ;background-color: #1fb0ac;float: right;border-radius: 6rpx;">刷新</text>

							</view>
						</view>

					</view>
				</view>
				<view  >@click="wzxq(item.id)"
					<view style="line-height: 60rpx;color: #000000;font-size: 30rpx;margin-top: 30rpx;font-weight: 600;">
						{{item.main_content}}
					</view>
					<view style="overflow: hidden;margin-top: 20rpx;" class="tu" v-if="item.main_images">
						<view v-for="(a,b) in item.main_images" :key='b' style="width: 190rpx;height: 190rpx;float: left;border-radius: 16rpx;overflow: hidden;">
							<image :src="a" style="width: 100%;height: 100%;left: 0;" mode="aspectFill"></image>
						</view>

					</view>
				</view>
				<view style="line-height: 80rpx;display: flex;">
					<view style="flex: 1;color: #999999;font-size: 24rpx;box-sizing: border-box;padding-left: 60rpx;position: relative;">
						<image src="@/static/index/icon_collect.png" style="width: 30rpx;height: 30rpx;position: absolute;top: 50%;left: 20rpx;transform: translateY(-50%);" mode=""></image>
						收藏({{item.collect_num}})

					</view>
					<view style="flex: 1;color: #999999;font-size: 24rpx;box-sizing: border-box;padding-left: 60rpx;position: relative;">
						<image src="@/static/index/icon_comment.png" style="width: 30rpx;height: 30rpx;position: absolute;top: 50%;left: 20rpx;transform: translateY(-50%);" mode=""></image>
						评论({{item.comment_num}})

					</view>
					<view style="flex: 1;color: #999999;font-size: 24rpx;box-sizing: border-box;padding-left: 60rpx;position: relative;">
						<image src="@/static/index/icon_like.png" style="width: 30rpx;height: 30rpx;position: absolute;top: 50%;left: 20rpx;transform: translateY(-50%);" mode=""></image>
						点赞({{item.like_num}})

					</view>
				</view>

				<view @click="yijian(item.id,item.voice_category_id)" style="width: 100%;height: 90rpx;line-height: 90rpx;text-align: center;background-color: #E5EFFF;color: #1fb0ac;font-size: 28rpx;border-radius: 45rpx;">
					一键再发布
				</view>
			</view> -->


			<view v-for="(item,index) in list" :key='index' style="width: 100%;margin: 20rpx auto;padding: 30rpx;box-sizing: border-box;border-radius:16rpx;background-color: #FFFFFF;">
				<view style="overflow: hidden;">
					<view style="width: 80rpx;height: 80rpx;float: left;margin-right: 30rpx;position: relative;">
						<image :src="item.user.avatar" style="width: 80rpx;height: 80rpx;display: block;border-radius: 12upx;overflow: hidden;"
							mode=""></image>
						<image v-if="item.user.is_vip==1 && item.type==2"
							src="https://frozen-info.oss-cn-shanghai.aliyuncs.com/uploads/miniapp/ren.png" style="width: 30rpx;height: 30rpx;position: absolute;right: -10rpx;bottom: -10rpx;z-index: 4;"
							mode=""></image>
						<image v-if="item.user.is_vip==2 && item.type==2"
							src="https://static-1310167831.cos.ap-nanjing.myqcloud.com/uploads/20220616/ce4d9a4e5c9d814d939dc3324abc44d6.png" style="width: 30rpx;height: 30rpx;position: absolute;right: -10rpx;bottom: -10rpx;z-index: 4;"
							mode=""></image>
						<image v-if="item.type==1"
							src="https://static-1310167831.cos.ap-nanjing.myqcloud.com/uploads/20220616/daf7dad493b169a57961fac90302d9be.png" style="width: 30rpx;height: 30rpx;position: absolute;right: -10rpx;bottom: -10rpx;z-index: 4;"
							mode=""></image>
					</view>
					<view style="width: 82%;float: left;">
						<view style="line-height: 50rpx;margin-bottom: 10rpx;overflow: hidden;">
							<text v-if="item.user.is_vip==2" style="color: #2B85E4;font-size: 30rpx;display: block;max-width: 300rpx;float: left;"
								class="yihang">{{item.user.remark_name || item.user.name}}</text>
							<text v-if="item.user.is_vip==1" style="color: #F29100;font-size: 30rpx;display: block;max-width: 300rpx;float: left;font-weight: 600;"
								class="yihang">{{item.user.remark_name || item.user.name}}</text>
							<!-- <view style="height: 50rpx;line-height: 50rpx;float: right;">
								<text @click="shua(a.id)" style="padding: 0rpx 20rpx;font-size: 24rpx;color:#FFFFFF ;background-color: #1fb0ac;float: left;border-radius: 6rpx;">刷新</text>
								<text @click="zhi(a.id)" style="padding: 0rpx 20rpx;font-size: 24rpx;color:#D46B00 ;background-color: #fff1dc;float: left;border-radius: 6rpx;margin-left: 10rpx;">置顶</text>
							</view> -->
						</view>
						<!-- 个人 -->
						<view v-if="item.type==2" style="line-height: 30rpx;font-size: 24rpx;margin-top: 10rpx;">
							{{item.user.company || ''}}
							<text v-if="item.user.position!=''" style="margin-left: 20rpx;">{{item.user.position || ''}}</text>
						</view>
						<!-- 企业 -->
						<view v-if="item.type==1" style="line-height: 30rpx;font-size: 24rpx;margin-top: 10rpx;">
							{{item.user.user_nickname || ''}}
							<text v-if="item.user.user_position!=''" style="margin-left: 20rpx;">{{item.user.user_position || ''}}</text>

						</view>
						<view style="overflow: hidden;margin-top: 10rpx;">
							<text class="xiao" style="color: red;" v-if="item.is_top==1">置顶</text>
							<text v-if="item.tips_manage.length>0" v-for="(a,b) in item.tips_manage" :key='b' class="xiao">{{a.name}}</text>
						</view>
					</view>
				</view>
				<view @click="wzxq(item.id)" style="color: #000000;font-size: 28rpx;line-height: 40rpx;margin: 16rpx 0 0;">
					<!-- <view class="sanhang">{{item.main_content}}</view> -->
					<view class="sihang">
						<text>{{item.main_content || ''}}</text>
					</view>
					<view v-if="item.more_check" style="line-height: 40rpx;color: #1fb0ac;font-size: 26rpx;">
						查看更多>
					</view>
				</view>
				<view @click="wzxq(item.id)"  style="overflow: hidden;" class="tu">
					<view v-for="(a,b) in item.main_images" :key='index' style="width: 190rpx;height: 190rpx;float: left;border-radius: 16rpx;overflow: hidden;">
						<image :src="a" style="width: 100%;height: 100%;left: 0;" mode="aspectFill"></image>
					</view>

				</view>
				<view style="overflow: hidden;margin: 20rpx 0 0;">
					<view style="float: left;line-height: 60rpx;margin-right: 10rpx;">
						<image src="https://frozen-info.oss-cn-shanghai.aliyuncs.com/uploads/miniapp/liulan.png"
							style="width: 60rpx;height: 60rpx;float: left;" mode=""></image>
						<text style="color: #000000;font-size: 24rpx;float: left;">
							{{item.collect_num>10000?( (item.collect_num/10000).toFixed(1)+'万' ):item.collect_num || 0}}
						</text>
					</view>
					<view style="float: left;line-height: 60rpx;margin-right: 10rpx;">
						<image src="https://frozen-info.oss-cn-shanghai.aliyuncs.com/uploads/miniapp/liuyan.png"
							style="width: 60rpx;height: 60rpx;float: left;" mode=""></image>
						<text style="color: #000000;font-size: 24rpx;float: left;">
							{{item.comment_num>10000?( (item.comment_num/10000).toFixed(1)+'万' ):item.comment_num || 0}}
						</text>
					</view>
					<view style="float: left;line-height: 60rpx;">
						<image src="https://frozen-info.oss-cn-shanghai.aliyuncs.com/uploads/miniapp/dianzan.png"
							style="width: 60rpx;height: 60rpx;float: left;" mode=""></image>
						<text style="color: #000000;font-size: 24rpx;float: left;">
							{{item.like_num>10000?( (item.like_num/10000).toFixed(1)+'万' ):item.like_num || 0}}
						</text>
					</view>
					<view @click="del(item.id,index)"
						style="height: 60rpx;border-radius: 10rpx;float: right;line-height: 60rpx;font-size: 22rpx;color: #ffffff;margin-left: 20rpx;background-color: #DD524D;">
						<text class="iconfont icon-shanchu" style="padding: 0 10rpx;"></text>
					</view>
					<!-- <view @click="yijian(item.id,item.voice_category_id,1)"
						style="width:130rpx;height: 60rpx;background: linear-gradient(0deg, #0078FF 0%, #0078FF 100%);border-radius: 10rpx;float: right;line-height: 60rpx;font-size: 22rpx;color: #ffffff;">
						<text  class="iconfont icon-bianji" style="float: left;margin: 0 10rpx 0 20rpx;"></text><text style="float: left;">编辑</text>
					</view> -->

				</view>
				<view @click="yijian(item.id,item.voice_category_id,2,item.refresh_status,item.refresh_text)" style="width: 100%;height: 90rpx;line-height: 90rpx;text-align: center;background-color: #E5EFFF;color: #1fb0ac;font-size: 28rpx;border-radius: 45rpx;margin-top: 20rpx;">
					一键再发布
				</view>

			</view>



			<view style="text-align: center;margin-top: 50rpx;">
				<image v-if="kk" :src="require('@/static/my/no-data.png')" style="width: 334rpx;"  mode="widthFix"></image>
				<view style="width: 80%;margin: 0 auto;">
					<u-divider color='#717171' bg-color='#f0f2f8' height='80' border-color='#717171' text="暂无数据" v-if="list.length==0"></u-divider>
					<u-divider color='#717171' bg-color='#f0f2f8' height='80' border-color='#717171' text="没有更多了" v-if="list.length>0 && enmpy"></u-divider>
				</view>
			</view>
		</view>



		<!-- <uni-popup id="popup" ref="popup" :type="type_a" :animation="true">
			<view class="" style="background-color: #FFFFFF;padding:20upx 30upx;border-radius: 20upx;width: 600rpx;">
				<view style="text-align: center;height: 100upx;line-height: 100upx;color: #333333;font-weight: 600;font-size: 32rpx;">
					选择刷新天数
				</view>
				<scroll-view scroll-y="true" style="height: 600rpx;">
					<view style="display: flex;line-height: 60rpx;text-align: center;">
						<view style="flex: 1;">

						</view>
						<view style="flex: 1;">
							天数
						</view>
						<view style="flex: 1;">
							价格
						</view>
						<view style="flex: 1;">
							会员价
						</view>
						<view style="flex: 1;">
							积分
						</view>
					</view>
					<view @click="xzzd(index)" style="display: flex;line-height: 60rpx;text-align: center;" v-for="(item,index) in sx_list" :key='index'>
						<view  style="flex: 1;">
							<image  :src="index==type?xz:wxz"  style="width: 30rpx;height: 30rpx;" mode=""></image>
						</view>
						<view style="flex: 1;">
							{{item.day}}
						</view>
						<view style="flex: 1;">
							{{item.price}}
						</view>
						<view style="flex: 1;">
							{{item.vip_price}}
						</view>
						<view style="flex: 1;">
							{{item.score}}
						</view>
					</view>
				</scroll-view>
				<view class="" style="display: flex;">
					<view @click="quxiao" style="margin-right:20rpx;flex:1;height: 80rpx;line-height: 80rpx;background-color: #C0C0C0;border-radius: 40rpx;color: #FFFFFF;font-size: 30rpx;text-align: center;">
						取消
					</view>
					<view @click="guan" style="flex:1;height: 80rpx;line-height: 80rpx;background-color: #1fb0ac;border-radius: 40rpx;color: #FFFFFF;font-size: 30rpx;text-align: center;">
						确定
					</view>
				</view>

			</view>
		</uni-popup> -->

		<uni-popup id="popup" ref="popup2" :type="type_a" :animation="true">
			<view class="" style="background-color: #FFFFFF;padding:20upx 30upx;border-radius: 20upx;width: 600rpx;">
				<view style="text-align: center;height: 100upx;line-height: 100upx;color: #333333;font-weight: 600;font-size: 32rpx;">
					选择置顶天数
				</view>
				<scroll-view scroll-y="true" style="height: 600rpx;">
					<view style="display: flex;line-height: 60rpx;text-align: center;">
						<view style="flex: 1;">

						</view>
						<view style="flex: 1;">
							天数
						</view>
						<view style="flex: 1;">
							价格
						</view>
						<view style="flex: 1;">
							会员价
						</view>
						<view style="flex: 1;">
							积分
						</view>
					</view>
					<view @click="zd_xz(index)" style="display: flex;line-height: 60rpx;text-align: center;" v-for="(item,index) in zd_list" :key='index'>
						<view  style="flex: 1;">
							<image  :src="index==zd_type?xz:wxz"  style="width: 30rpx;height: 30rpx;" mode=""></image>
						</view>
						<view style="flex: 1;">
							{{item.day}}
						</view>
						<view style="flex: 1;">
							{{item.price}}
						</view>
						<view style="flex: 1;">
							{{item.vip_price}}
						</view>
						<view style="flex: 1;">
							{{item.score}}
						</view>
					</view>
				</scroll-view>

				<view class="" style="display: flex;margin-top: 30rpx;">
					<view @click="quxiao2" style="margin-right:20rpx;flex:1;height: 80rpx;line-height: 80rpx;background-color: #C0C0C0;border-radius: 40rpx;color: #FFFFFF;font-size: 30rpx;text-align: center;">
						取消
					</view>
					<view @click="guanbi2" style="flex:1;height: 80rpx;line-height: 80rpx;background-color: #1fb0ac;border-radius: 40rpx;color: #FFFFFF;font-size: 30rpx;text-align: center;">
						确定
					</view>
				</view>
			</view>
		</uni-popup>
		<uni-popup id="popup" ref="popup3" :type="type_a" :animation="true">
			<view class="" style="background-color: #FFFFFF;padding:20upx 30upx;border-radius: 20upx;width: 600rpx;">
				<view style="text-align: center;height: 100upx;line-height: 100upx;color: #333333;font-weight: 600;font-size: 32rpx;">
					选择支付方式
				</view>
					<view @click="zdzf(index)" style="display: flex;line-height: 60rpx;text-align: center;" v-for="(item,index) in zf_list" :key='index'>
						<view  style="flex: 2;">
							<image  :src="index+1==zd_status?xz:wxz"  style="width: 30rpx;height: 30rpx;" mode=""></image>
						</view>
						<view style="flex:3;text-align: left;">
							{{item}}
						</view>
					</view>

				<view class="" style="display: flex;margin-top: 30rpx;">
					<view @click="quxiao3" style="margin-right:20rpx;flex:1;height: 80rpx;line-height: 80rpx;background-color: #C0C0C0;border-radius: 40rpx;color: #FFFFFF;font-size: 30rpx;text-align: center;">
						取消
					</view>
					<view @click="guanbi3" style="flex:1;height: 80rpx;line-height: 80rpx;background-color: #1fb0ac;border-radius: 40rpx;color: #FFFFFF;font-size: 30rpx;text-align: center;">
						确定
					</view>
				</view>
			</view>
		</uni-popup>

	</view>
</template>

<script>
	export default{
		data(){
			return{
				page:1,
				list:[],
				enmpy:false,
				kk:false,
				tabIndex:1,

				type_a:'center',
				sx_list:'',
				id:'',
				type:0,
				xz:'https://frozen-info.oss-cn-shanghai.aliyuncs.com/uploads/miniapp/54.png',
				wxz:'https://frozen-info.oss-cn-shanghai.aliyuncs.com/uploads/miniapp/53.png',

				sxxx:{},


				zf_list:['微信支付','积分支付'],
				status:1,
				zd_type:0,
				zd_list:[],
				zd_status:1,
				pingguo_xian:false,
			}
		},

		onLoad() {
			this.wdgz()
			this.shuaxin()
			this.zhiding()
			this.pingguo()
		},

		onReachBottom: function() {
			console.log(222222222)
			if (this.enmpy) {
				return
			} else {
				this.wdgz()
			}
		},
		methods:{
			del:function(id,index){
				this.post('api/voice/delete',{id:id},true).then(res=>{
					console.log(res)
					if(res.code==1){
						uni.showToast({
							title: res.msg,
							icon: "none",
							duration: 1500
						})
						this.list.splice(index,1)
					}
				})
			},
			// 刷新
			shuaxin:function(){
				this.post('api/voice/refresh','',true).then(res=>{
					console.log(res)
					if(res.code==1){
						// this.sx_list=res.data
						this.sxxx=res.data
					}
				})
			},
			shua:function(id){
				// this.id=id
				// this.$refs.popup.open()
				let that=this
				uni.showModal({
					title: '提示',
					content: '刷新需要支付'+this.sxxx.price+'元，(会员需要支付'+this.sxxx.vip_price+')元。',
					success: function (res) {
						if (res.confirm) {
							console.log('用户点击确定');
								that.post('api/pay/refresh_pay',{id:that.sxxx.id,voice_id:id},true).then(res=>{
									console.log(res)
									if(res.code==1){
										uni.getSystemInfo({
										    success: function (res) {
												let str = res.model
												console.log(str.indexOf("iPhone") != -1); // true
												that.post('api/index/wechat_check','',true).then(re=>{
													if(str.indexOf("iPhone") != -1){
														if(re.data==1){
															that.fukuan()
														}else{
															uni.showModal({
															    title: '温馨提示',
															    content: '由于相关规范，ios功能暂不可用！',
															    success: function (res) {
															        if (res.confirm) {

															        } else if (res.cancel) {

															        }
															    }
															});

														}
													}else{
														that.fukuan()
													}
												})

										    }
										});
									}else{
										uni.showToast({
											title: res.msg,
											icon: "none",
											duration: 1000
										})
									}
								})
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			pingguo:function(){
				let that=this
				uni.getSystemInfo({
					    success: function (res) {
							let str = res.model
							console.log(str.indexOf("iPhone") != -1); // true
							that.post('api/index/wechat_check','',true).then(re=>{
								if(re.data==1){
									that.pingguo_xian=true
								}else{
									that.pingguo_xian=false
								}
								return
								if(str.indexOf("iPhone") != -1){
									if(re.data==1){
										that.pingguo_xian=true
									}else{
										that.pingguo_xian=false
									}
								}else{
									that.pingguo_xian=true
								}
							})

					    }
					});
			},
			fukuan:function(){
				let that=this
				uni.requestPayment({
					    provider: 'wxpay',
					    timeStamp: res.data.timeStamp,
					    nonceStr: res.data.nonceStr,
					    package: res.data.package,
					    signType: res.data.signType,
					    paySign: res.data.paySign,
					    success: function (res) {
					      uni.showToast({
					      	title: '支付成功',
					      	icon: "none",
					      	duration: 1000
					      })
					    },
					    fail: function (err) {
							uni.showToast({
								title: '您已取消支付',
								icon: "none",
								duration: 1000
							})
					        console.log(err);
					    }
				});
			},
			// xzzd:function(index){
			// 	this.type=index
			// },
			// quxiao:function(){
			// 	this.$refs.popup.close()
			// },
			// guan:function(){
			// 	this.$refs.popup.close()
			// 	this.$refs.popup1.open()
			// },
			// xzzf:function(index){
			// 	this.status=index+1
			// },
			// quxiao1:function(){
			// 	this.$refs.popup1.close()
			// },
			// guanbi:function(){
			// 	this.$refs.popup1.close()
			// 	this.post('api/post/refresh',{post_id:this.id,trade_type:this.status,refresh_id:this.sx_list[this.type].id},true).then(res=>{
			// 		console.log(res)
			// 		if(res.code==1){
			// 			if(this.status==1){
			// 				uni.requestPayment({
			// 				    provider: 'wxpay',
			// 				    timeStamp: res.data.pay.timeStamp,
			// 				    nonceStr: res.data.pay.nonceStr,
			// 				    package: res.data.pay.package,
			// 				    signType: res.data.pay.signType,
			// 				    paySign: res.data.pay.paySign,
			// 				    success: function (res) {
			// 				      uni.showToast({
			// 				      	title: '支付成功',
			// 				      	icon: "none",
			// 				      	duration: 1000
			// 				      })
			// 				    },
			// 				    fail: function (err) {
			// 				        console.log('fail:' + JSON.stringify(err));
			// 				    }
			// 				});
			// 			}else{
			// 				uni.showToast({
			// 					title: res.msg,
			// 					icon: "none",
			// 					duration: 1000
			// 				})
			// 			}
			// 		}else{
			// 			uni.showToast({
			// 				title: res.msg,
			// 				icon: "none",
			// 				duration: 1000
			// 			})
			// 		}
			// 	})
			// },


			zhiding:function(){
				this.post('api/voice/top','',true).then(res=>{
					console.log(res)
					if(res.code==1){
						this.zd_list=res.data
					}
				})
			},
			zhi:function(id){
				this.id=id
				if(this.pingguo_xian){
					this.$refs.popup2.open()
				}
			},
			zd_xz:function(index){
				this.zd_type=index
			},
			quxiao2:function(){
				this.$refs.popup2.close()
			},
			guanbi2:function(){
				this.$refs.popup2.close()
				this.$refs.popup3.open()
			},
			zdzf:function(index){
				this.zd_status=index+1
			},
			quxiao3:function(){
				this.$refs.popup3.close()
			},
			guanbi3:function(){
				this.$refs.popup3.close()
				this.post('api/pay/top_pay',{voice_id:this.id,type:this.zd_status,id:this.zd_list[this.zd_type].id},true).then(res=>{
					console.log(res)
					if(res.code==1){
						if(this.zd_status==1){
							uni.getSystemInfo({
							    success: function (res) {
									let str = res.model
									console.log(str.indexOf("iPhone") != -1); // true
									that.post('api/index/wechat_check','',true).then(re=>{
										if(str.indexOf("iPhone") != -1){
											if(re.data==1){
												that.fukuan()
											}else{
												uni.showModal({
												    title: '温馨提示',
												    content: '由于相关规范，ios功能暂不可用！',
												    success: function (res) {
												        if (res.confirm) {

												        } else if (res.cancel) {

												        }
												    }
												});

											}
										}else{
											that.fukuan()
										}
									})

							    }
							});
						}else{
							uni.showToast({
								title: res.msg,
								icon: "none",
								duration: 1000
							})
						}
					}else{
						uni.showToast({
							title: res.msg,
							icon: "none",
							duration: 1000
						})
					}
				})
			},




			yijian:function(id,daid,type,status,time){
				// uni.setStorageSync('daid',daid)
				if(status==1){
					uni.setStorageSync('tzid',id)
					uni.setStorageSync('fb_type',1)
					uni.navigateTo({
						url:'/subpages/pages/fbtz?type='+type
					})
				}else{
					uni.showToast({
						title: time,
						icon: "none",
						duration: 1000
					})
				}
			},
			wzxq:function(id){
				uni.navigateTo({
					url:'/fenbao/pages/wenzhang/wzxq?id='+id
				})
			},
			// 我的关注
			wdgz:function(){
				let data={
					page:this.page,
					limit:10
				}
				this.post('api/client/publish',data,true).then(res=>{
					console.log(res)
					if(res.code==1){
						if(this.page==1){
							if (res.data.data== null || res.data.data.length == 0) {
								this.kk = true
								this.enmpy = true
								return
							} else if (res.data.data.length < 10) {
								this.enmpy = true
							}
						}else{
							if (res.data.data== null || res.data.data.length == 0) {
								this.enmpy = true
								return
							} else if (res.data.data.length < 10) {
								this.enmpy = true
							}
						}

						this.page++
						this.list.push(...res.data.data)
						for(let i=0;i<this.list.length;i++){
							this.list[i].num=!this.list[i].main_content.match(/\n/g)?0:this.list[i].main_content.match(/\n/g).length
							if(this.list[i].num>=4 || this.list[i].main_content.length>=88 || (this.list[i].num==3 && this.list[i].main_content.length>=25) || (this.list[i].num==2 && this.list[i].main_content.length>=46) || (this.list[i].num==1 && this.list[i].main_content.length>=67)){
								this.list[i].more_check=true
							}else{
								this.list[i].more_check=false
							}
						}
					}else{
						this.kk = true
						uni.showToast({
							title: res.msg,
							icon: "none",
							duration: 1000
						})
					}
				})
			},
		}
	}
</script>

<style lang="scss">
	.xiao {
		color: #19BE6B;
		font-size: 20rpx;
		padding: 0rpx 10rpx;
		background: #f3f3f3;
		border-radius: 14rpx;
		display: inline-block;
		height: 30rpx;
		line-height: 30rpx;
		margin-right: 10rpx;
		margin-bottom: 10rpx;
		float: left;
	}
	page{
		background-color: #F8F8F8!important;
		font-family: Demibold;
	}
	.tu>view {
		margin: 10rpx 0;
	}

	.tu>view:nth-child(3n+2) {
		margin: 10rpx 30rpx;
	}
</style>
